<?php

namespace App\Event;

use App\Model\CoinLog;

/**
 * 用户消费事件
 */
class ConsumeEvent
{
    public $userId;
    public $hostUserId;
    public $costCoin;
    public $incomeCoin;
    public $changeRich;
    public $logFrom;
    public $eventType = 'consume';

    public function __construct(
        $userId = 0,
        $hostUserId = 0,
        $costCoin = 0,
        $incomeCoin = 0,
        $changeRich = true,
        $from = CoinLog::FROM_INVITE_INCOME_CALL
    ) {
        $this->userId = $userId;
        $this->hostUserId = $hostUserId;
        $this->costCoin = $costCoin;
        $this->incomeCoin = $incomeCoin;
        $this->changeRich = $changeRich;
        $this->logFrom = $from;
    }
}
